home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9743 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.0 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 3 Mar 1996 20:54:21 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4hdt1tINN44i@keats.ugrad.cs.ubc.ca>
  8. References: <JSA.96Feb16135027@organon.com> <dewar.825640041@schonberg> <4h7i55INNknq@anvil.ugrad.cs.ubc.ca> <dewar.825776000@schonberg>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <dewar.825776000@schonberg>, Robert Dewar <dewar@cs.nyu.edu> wrote:
  12. >Kazimir says
  13. >
  14. >   Standardization notwithstanding, any language will allow you to write
  15. >   errnoeous programs, whose outcome could have dire consequences. I can
  16. >   write in Ada a function that computes something other than what I
  17. >   intend it to compute, as I can in C.
  18. >
  19. >   Whether I'm more or less likely to do it in C is more of a matter for
  20. >   religious debate. Competent software engineers can work with either one
  21. >   and produce correct, well-defined results according to the standards.
  22. >   In addition to that,
  23. >
  24. >To which I reply
  25. >
  26. >   Ssafety features notwithstanding, any car will allow you to cause a
  27. >   car crash, whose outcome could have dire consequences. I can just as
  28. >   well drive a modern Volvo into a brick wall as I can a 1960's Detroit
  29. >   car built with no safety concerns.
  30. >
  31. >   Whether I'm more or less likely to do it in the old Detroit car is more
  32. >   of a matter for religious debate. Competent drivers can avoid accidents
  33. >   in any car.
  34.  
  35. To which I reply: computer programs are deterministic. They are not cars
  36. barreling down the highway. Your analogy is completely idiotic, and belongs in
  37. *.os.advocacy.
  38.  
  39. Safety is not only a function ofthe language, but of the entire environment:
  40. the operating system, the hardware and so forth. A program is either correct or
  41. not.
  42.  
  43. I reiterate something I mentioned recently: a few days ago I found a bug in the
  44. project I'm working on that was completely unrelated to the language in which
  45. I'm working. The program was perfectly valid; a wrong statement caused it to
  46. compute an incorrect calculation. This was hard to spot because its occurence
  47. was made rare due to a certain contingency in the logic.
  48.  
  49. On the other hand, I have not had any of the problems in this same that you Ada
  50. fanatics associate with C (overrun arrays, runaway pointers, etc). Blame it on
  51. your incomplete mastery of programming.
  52.  
  53. I could just as well have written the same error in an Ada program as in a C
  54. program. The code is not going to magically ``do what I mean'' if I write it in
  55. Ada.
  56.  
  57. You are completely irresponsible if you depend on your development language to
  58. provide the safety element. I would not want to be at the mercy of
  59. safety-critical software written by you if that is your attitude, no matter
  60. what you write it in. In fact, I'd rather it be done by a shrewd C coder who
  61. has the programming fortitude and expertise to get it right, rather than some
  62. military fruitcake who cringes at the sight of a curly brace.
  63. -- 
  64.  
  65.